#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>

using namespace std;

int sum(int l, int r)
{
    int sums = 0;
    for (int i = l; i <= r; i++)
        sums += i;
    return sums;
}

int main()
{
    int l, r;
    cin >> l >> r;
    cout << sum(l, r) << endl;
    return 0;
}